package com.xiaoer.studyenglishdemo.util;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import androidx.annotation.Nullable;

public class WordsDBHelper extends SQLiteOpenHelper {
    static String TABLE_WORDS = "t_words";
    String createTableSQL = "create table " + TABLE_WORDS + " (id INTEGER primary key,imgurl text,introduce text,means text,shortsentence text,sentence1 text,sentence2 text,sentence3 text,wordlevel text,studytype text,localimg INTEGER)";
    SQLiteDatabase sqLiteDatabase = null;

    public WordsDBHelper(@Nullable Context context) {
        super(context, "db_words.db", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        this.sqLiteDatabase = db;
        this.sqLiteDatabase.execSQL(createTableSQL);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
